<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>DM_GETTEXT</title>
<meta http-equiv="Content-Type" Content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../../../styles/styles.css">
<script language="javascript" src='../../links.js' type="text/javascript"></script>
</head>
<body>

<h1>DM_GETTEXT</h1>
<div class=navbar>
<a  href="index_dm.html">Messages</a> |
<a href="../index.html">Dialog API</a><br>
</div>

<div class=shortdescr>
The <dfn>DM_GETTEXT</dfn>
message is sent to the dialog manager to retrieve the text of an edit string or the caption of an item.
</div>

<h3>Param1</h3>
<div class=descr>
The ID of the dialog item for which you want to retrieve the text.
</div>

<h3>Param2</h3>
<div class=descr>
Pointer to a <a href="../structures/fardialogitemdata.html">FarDialogItemData</a>structure that receives the text.<br>
If <dfn>Param2</dfn> is NULL this is yet another way to retrieve necessary data size (see <a href="dm_gettextlength.html">DM_GETTEXTLENGTH</a>):
<pre class=code>
LenData=SendDlgMessage(hDlg,DM_GETTEXT,1,(LONG_PTR)NULL);
</pre>

is equal to 

<pre class=code>
LenData=SendDlgMessage(hDlg,DM_GETTEXTLENGTH,1,0);
</pre>
</div>

<h3>Return</h3>
<div class=descr>
Data size without terminating character '\0'.
</div>

<h3>Controls</h3>
<div class=descr>
<table class="cont">
<tr class="cont"><th class="cont" width="40%">Control</th><th class="cont" width="60%">Description</th></tr>
<tr class="cont"><td class="cont" width="40%">All</td>
<td class="cont" width="60%">String data for edit lines, captions for other items.
Everything contained in FarDialogItem.Data or FarDialogItem.PtrData.</td></tr>
</table>

</div>

<h3>Remarks</h3>
<div class=descr>
The <dfn>DM_GETTEXT</dfn> message in FAR versions up to (and including) 1.70 beta 3 returned the size INCLUDING the terminating character.
</div>

<h3>Example</h3>
<div class=descr>

</div>


<div class=see>See also:</div><div class=seecont>
<a href="../dialogex.html">DialogEx</a> |
<a href="dm_settextptr.html">DM_SETTEXTPTR</a><br>
</div>

</body>
</html>
